<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('game/gameList')}">游戏列表</a></li>
        <li><a href="{:url('game/add')}">添加游戏</a></li>
        <li class="active"><a>编辑游戏</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Game/editPost')}">
        <div class="col-md-9">
            <div class="form-group">
                <label for="input-game_name" class="col-sm-2 control-label"><span class="form-required">*</span>游戏名</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-game_name" name="game_name" value="{$game_name}">
                </div>
            </div>
            <div class="form-group">
                <label for="input-game_ename" class="col-sm-2 control-label">游戏英文名</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-game_ename" name="game_ename" value="{$game_ename}">
                </div>
            </div>
            <div class="form-group">
                <label for="input-brief" class="col-sm-2 control-label"><span class="form-required">*</span>游戏简介</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-brief" name="brief" value="{$brief}">
                </div>
            </div>
            <div class="form-group">
                <label for="input-play_url" class="col-sm-2 control-label"><span class="form-required">*</span>游戏地址</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-play_url"  name="play_url" value="{$play_url}">
                </div>
            </div>
            <div class="form-group">
                <label for="input-win_probability" class="col-sm-2 control-label"><span class="form-required">*</span>中奖概率</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-win_probability"  name="win_probability" value="{$win_probability}">
                </div>
            </div>
            <div class="form-group">
                <label for="input-multiple_list" class="col-sm-2 control-label"><span class="form-required">*</span>倍场列表</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-multiple_list" name="multiple_list" value="{$multiple_list}" placeholder="填写数字用.隔开 例:1.3.5.6">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" name="id" value="{$id}" />
                    <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                    <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <table class="table table-bordered">
                <tr>
                    <th><b>游戏图标</b></th>
                </tr>
                <tr>
                    <td>
                        <div style="text-align: center;">
                            <input type="hidden" name="game_logo" id="thumb" value="{$game_logo|default=''}">
                            <a href="javascript:uploadOneImage('图片上传','#thumb');">
                                <if condition="empty($game_logo)">
                                    <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumb-preview"
                                         width="135" style="cursor: hand"/>
                                    <else/>
                                    <img src="{:cmf_get_image_preview_url($game_logo)}" id="thumb-preview"
                                         width="135" style="cursor: hand"/>
                                </if>

                            </a>
                            <input type="button" class="btn btn-sm"
                                   onclick="$('#thumb-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
                                   value="取消图片">
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>